#!/bin/bash

#	curl test script of UGNM service. 
#	
#	Tests resources /achievements and /achievements/<id> including all supported HTTP operations
#	and all possible responses. Unsupported operations are not explicitly tested.

echo -e "Resource /achievements"
echo -e "======================"

# get all achievements
echo -e "\nGET - get all achievements\n"

curl http://localhost:8080/ugnm-service/resources/achievements -v -X GET

# create new achievement
echo -e "\nPOST - create new achievement\n"
curl http://localhost:8080/ugnm-service/resources/achievements -v -X POST -H "Content-Type: application/json" -d "{'imgurl':'http://images2.wikia.nocookie.net/__cb20110721021225/strikewitches/images/f/fd/Badge-regiment-sas.gif','name':'Eromir'}"

